package firstStage.part8;

/**
 * @ClassName: [Student]
 * @Description: 学生类
 * @Author: [黄劲松]
 * @CreateDate: [2021-02-06]
 * @Version: [v1.0]
 */
public class Student {
    //成员变量
    private String name;
    private int age;

    //构造方法
    public Student() {
        System.out.println("无参数构造方法");
    }

    public Student(String name) {
        this.name = name;
    }

    public Student(int age) {
        this.age = age;
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    //成员方法
    public void show() {
        System.out.println(name + "," + age);
    }
}
